import React from "react"
import { observer, inject } from "mobx-react"
import "./endPop.scss"

@inject("UserStore")
@observer
class EndPop extends React.Component {
  constructor(props) {
    super(props)
    this.state = {}
  }
  componentDidMount() {
    console.log(this.props)
  }
  componentWillMount() {
    // clearTimeout(this.timer)
  }

  render() {
    // const { postOrGetDataMsg } = this.props.UserStore

    return (
      <div className="end-pop-area">
        <img
          className="pop-icon"
          src={require("../../static/upload/img_tankuang_bubu@3x.png")}
          alt=""
        />
        <div className="pop-main">
          {this.props.type == "repeat" ? (
            <div>
              <div className="pop-desc">活动报名已截止，不可重复提交</div>
              <div className="pop-btns">
                <div
                  className="btn-item confirm"
                  onClick={() => {
                    this.props.closeFun()
                  }}
                >
                  知道了
                </div>
              </div>
            </div>
          ) : (
            <div className="pop-desc">活动报名已截止，感谢您的参与</div>
          )}
        </div>
      </div>
    )
  }
}

export default EndPop
